package abinly.harmony.permission.compiler;

import javax.lang.model.element.ExecutableElement;

public class PermissionGroupElement {

    private ExecutableElement needsSelfPermissionElement;

    private ExecutableElement needsCallingPermissionElement;

    private ExecutableElement needsCallingOrSelfPermissionElement;

    private ExecutableElement mOnPermissionBlockedElement;

    private final String[] mNeedsPermissionArrays;

    private final int mRequestCode;

    public PermissionGroupElement(String... mNeedsPermissionArrays) {
        this.mNeedsPermissionArrays = mNeedsPermissionArrays;
        this.mRequestCode = RequestCodeCreater.CREATER.getRequestCode();
    }

    public ExecutableElement getNeedsSelfPermissionElement() {
        return needsSelfPermissionElement;
    }

    public void setNeedsSelfPermissionElement(ExecutableElement mNeedsPermissionElement) {
        this.needsSelfPermissionElement = mNeedsPermissionElement;
    }

    public ExecutableElement getNeedsCallingPermissionElement() {
        return needsCallingPermissionElement;
    }

    public void setNeedsCallingPermissionElement(ExecutableElement needsCallingPermissionElement) {
        this.needsCallingPermissionElement = needsCallingPermissionElement;
    }

    public ExecutableElement getNeedsCallingOrSelfPermissionElement() {
        return needsCallingOrSelfPermissionElement;
    }

    public void setNeedsCallingOrSelfPermissionElement(ExecutableElement needsCallingOrSelfPermissionElement) {
        this.needsCallingOrSelfPermissionElement = needsCallingOrSelfPermissionElement;
    }

    public ExecutableElement getOnPermissionBlockedElement() {
        return mOnPermissionBlockedElement;
    }

    public void setOnPermissionBlockedElement(ExecutableElement mOnPermissionBlockedElement) {
        this.mOnPermissionBlockedElement = mOnPermissionBlockedElement;
    }

    public String[] getNeedsPermissionArrays() {
        return mNeedsPermissionArrays;
    }

    public int getRequestCode() {
        return mRequestCode;
    }
}
